﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace TestScaner
{
    public enum Tokens
    {
        IDENTIFIER,
        KEYWORD,
        INTEGER_LITERAL,
        REAL_LITERAL,
        CHARACTER_LITERAL,
        STRING_LITERAL,
        OPERATOR,
        PUNCTUATOR,
        DELIM,
        COMMENTS,
        ERROR
    }

    public struct AtomLexical
    {
        public AtomLexical(string sir, Tokens tip, int l)
        {
            lexema = sir;
            tipAtom = tip;
            linie = l;
        }

        public string lexema;
        public Tokens tipAtom;
        public int linie;
    }

    class Scaner
    {
        private List<string> Q;
        private List<char> Sigma;
        private List<Transition> Delta;
        private DeterministicFSM dFSM;
        private string Q0;
        private List<string> F;
        private StreamReader streamReader;
        private char ultimulCaracterCitit = '\n';
        private bool primaCitire = true;
        private int linie = 1;
        private string[] Keywords =
        {
            "abstract","break","char","continue","do", "event","finally",
            "as","byte", "checked","decimal","double","explicit","fixed",
            "goto","in","is","new","out","private","ref","foreach","internal",
            "namespace","operator","params","readonly","base","case",
            "class", "default","else","extern","float","if","int","lock",
            "null","protected","return","sealed","static","this",
            "typeof","unsafe","void","short","string","throw","uint",
            "ushort","volatile","sizeof","struct","true","ulong","using",
            "while","virtual","uncheked","try","switch","stackalloc",
            "sbyte","public","override","object","bool","catch","const",
            "delegate","enum","false","for","implicit","interface","long"
        };


        public Scaner()
        {
            Q = new List<string> { "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q8", "q10", "q11", "q12", "q13", "q14", "q15", "q16",
                                   "q17", "q18", "q19", "q20","q21", "q22", "q23", "q24", "q25", "26", "q27","q28","q29", "q30", "q31", "q32",
                                   "q33", "q34", "q35", "q36", "q37", "q38", "q39", "q40", "q41", "q42", "q43", "q44", "q45", "q46", "q47", "q48", 
                                   "q49", "q50","q51","q52","q53","q54", "q55", "q56", "q57"};
            Sigma = new List<char>
            {  
                ' ','!','\"','#','$','%','&','\'','(',')','*','+',',','-','.','/',
                '0','1','2','3','4','5','6','7','8','9',':',';','<','=','>','?','@',
                'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
                '[','\\',']','^','_','`',
                'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
                '{','|','}','~',
                '\a','\b','\f','\n','\r','\t','\v'
            };

            Delta = creeazaFunctiaDelta();

            Q0 = "q0";
            F = new List<string> { "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q8", "q9", "q10","q11", "q12","q13","q14","q15",
                                    "q16", "q17","q18","q19","q20","q23", "q27","q30","q31", "q32", "q33","q34", "q35","q36","q37","q38",
                                    "q39", "q41","q42","q44","q45","q46", "q47","q49","q50","q53","q54", "q57"};

            dFSM = new DeterministicFSM(Q, Sigma, Delta, Q0, F);
        }

        public void daFisierSursa(string sourceFile)
        {
            if (File.Exists(@sourceFile) == false)
                throw new FileNotFoundException();
            streamReader = new StreamReader(@sourceFile);
            primaCitire = true;
        }

        public AtomLexical nextToken(out bool endOfFile)
        {
            //directive = null;

            if (streamReader == null)
                throw new Exception();

            char symbol;
            StringBuilder sb = new StringBuilder();
            if (primaCitire == true)
            {
                primaCitire = false;
                if ((symbol = (char)streamReader.Read()) < 0)
                    throw new Exception();
            }
            else
                symbol = ultimulCaracterCitit;
            string nextState = "q0";
            string previousState = "q0";
            do
            {
                if (symbol == '#' && "\n\r\v\f\t".IndexOf(ultimulCaracterCitit)!=-1)
                {
                    //Eliminam directiva de preprocesare.
                   // directive = new List<string>();
                    StringBuilder dir = new StringBuilder();
                    dir.Append(symbol);
                    while ((symbol = (char)streamReader.Read()) > 0)
                    {
                        if (symbol == '\n')
                        {
                            if ((symbol = (char)streamReader.Read()) < 0)
                            {
                                ultimulCaracterCitit = '\n';
                                break;
                            }
                            if (symbol != '#')
                            {
                                ultimulCaracterCitit = '\n';
                                break;
                            }
                            else
                            {
                                //directive.Add(dir.ToString());
                                dir.Clear();
                            }
                        }
                        dir.Append(symbol);
                    }
                   // directive.Add(dir.ToString());
                    dir.Clear();
                }

                ultimulCaracterCitit = symbol;
                if (symbol == '\n')
                    linie++;
                if (symbol == '\\')
                    symbol = '\\';
                nextState=dFSM.Accepts(nextState,symbol);
                if (nextState.IndexOf("49") != -1)
                {
                    if (F.Contains(previousState) == true)
                    {
                        //Starea anterioara este una finala.
                        endOfFile = streamReader.EndOfStream;
                        return new AtomLexical(sb.ToString(),tipAtomLexical(previousState,sb.ToString()),linie);
                    }
                }
                previousState=nextState;
                sb.Append(symbol);
            }
            while ((symbol = (char)streamReader.Read()) > 0);

            endOfFile = streamReader.EndOfStream;
            if (F.Contains(previousState) == true)
                return new AtomLexical(sb.ToString(), tipAtomLexical(previousState,sb.ToString()), 0);
            else
                return new AtomLexical(sb.ToString(), Tokens.ERROR, 0);
        }

        private Tokens tipAtomLexical(string state,string lexema)
        {
            //Extragem cifrele din state cu ajutorul expresiilor regulate.
            string s = System.Text.RegularExpressions.Regex.Match(state, @"\d+").Value;
            int stare;
            if (int.TryParse(s, out stare) == false)
            {
                throw new Exception();
            }
            switch (stare)
            {
                case 1: return Tokens.PUNCTUATOR;
                case 2: return Tokens.OPERATOR;
                case 3: return Tokens.OPERATOR;
                case 4: return Tokens.OPERATOR;
                case 5: return Tokens.OPERATOR;
                case 6: return Tokens.OPERATOR;
                case 7: return Tokens.OPERATOR;
                case 8: return Tokens.OPERATOR;
                case 9: return Tokens.OPERATOR;
                case 10: return Tokens.OPERATOR;
                case 11: return Tokens.OPERATOR;
                case 12: return Tokens.OPERATOR;
                case 13: return Tokens.OPERATOR;
                case 14: return Tokens.OPERATOR;
                case 15: return Tokens.OPERATOR;
                case 16: return Tokens.OPERATOR;
                case 17: return Tokens.OPERATOR;
                case 18: return Tokens.OPERATOR;
                case 19: return Tokens.OPERATOR;
                case 20: return Tokens.OPERATOR;
                case 23: return Tokens.STRING_LITERAL;
                case 27: return Tokens.CHARACTER_LITERAL;
                case 30: return Tokens.STRING_LITERAL;
                case 31:
                    if (Keywords.Contains(lexema) == true)
                        return Tokens.KEYWORD;
                    return Tokens.IDENTIFIER;
                case 32: return Tokens.PUNCTUATOR;
                case 33:
                    if (Keywords.Contains(lexema) == true)
                        return Tokens.KEYWORD;
                    return Tokens.IDENTIFIER;
                case 34: return Tokens.INTEGER_LITERAL;
                case 35: return Tokens.INTEGER_LITERAL;
                case 36: return Tokens.INTEGER_LITERAL;
                case 37: return Tokens.INTEGER_LITERAL;
                case 38: return Tokens.INTEGER_LITERAL;
                case 39: return Tokens.INTEGER_LITERAL;
                case 41: return Tokens.REAL_LITERAL;
                case 42: return Tokens.REAL_LITERAL;
                case 44: return Tokens.REAL_LITERAL;
                case 45: return Tokens.REAL_LITERAL;
                case 46:
                    if (Keywords.Contains(lexema) == true)
                        return Tokens.KEYWORD;
                    return Tokens.IDENTIFIER;
                case 47: return Tokens.DELIM;
                case 50: return Tokens.OPERATOR;
                case 53: return Tokens.COMMENTS;
                case 54: return Tokens.OPERATOR;
                case 57: return Tokens.COMMENTS;
                default: return Tokens.ERROR;
            }
        }

        private List<Transition> creeazaFunctiaDelta()
        {
            var Delta = new List<Transition>{
            new Transition("q0", simboluri[3], "q1"),new Transition("q0", simboluri[4], "q1"),new Transition("q0", simboluri[8], "q1"),
            new Transition("q0", simboluri[9], "q1"),new Transition("q0", simboluri[12], "q1"),new Transition("q0", simboluri[26], "q1"),
            new Transition("q0", simboluri[27], "q1"),new Transition("q0", simboluri[31], "q1"),new Transition("q0", simboluri[59], "q1"),
            new Transition("q0", simboluri[61], "q1"),new Transition("q0", simboluri[64], "q1"),
            new Transition("q0", simboluri[91], "q1"),new Transition("q0", simboluri[93], "q1"),new Transition("q0", simboluri[94], "q1"),
            new Transition("q0", simboluri[95], "q1"),//Semne de punctuatie

            new Transition("q0", simboluri[1], "q2"),new Transition("q0", simboluri[10], "q2"),new Transition("q0", simboluri[15], "q50"),
            new Transition("q0", simboluri[29], "q2"),new Transition("q0", simboluri[62], "q2"),new Transition("q0", simboluri[5], "q2"),//Operatori

            new Transition("q0", simboluri[6], "q4"),//Ampersand

            new Transition("q0", simboluri[11], "q7"),//Plus

            new Transition("q0", simboluri[13], "q10"),//Minus

            new Transition("q0", simboluri[28], "q14"),//Mai mare

            new Transition("q0", simboluri[30], "q17"),//Mai mic

            new Transition("q0", simboluri[14], "q20"),//Punct

            new Transition("q0", simboluri[2], "q21"),//Ghilimele

            new Transition("q0", simboluri[7], "q25"),//Apostrof

            new Transition("q0", simboluri[32], "q28"),//@

            new Transition("q0", simboluri[63], "q32"),//_

            new Transition("q0", simboluri[16], "q34"),//zero

            new Transition("q0", simboluri[17], "q35"),new Transition("q0", simboluri[18], "q35"),new Transition("q0", simboluri[19], "q35"),
            new Transition("q0", simboluri[20], "q35"),new Transition("q0", simboluri[21], "q35"),new Transition("q0", simboluri[22], "q35"),
            new Transition("q0", simboluri[23], "q35"),new Transition("q0", simboluri[24], "q35"),new Transition("q0", simboluri[25], "q35"),//Cifrele de la 1 la 9

            new Transition("q0", simboluri[65], "q46"),new Transition("q0", simboluri[66], "q46"),new Transition("q0", simboluri[67], "q46"),
            new Transition("q0", simboluri[68], "q46"),new Transition("q0", simboluri[69], "q46"),new Transition("q0", simboluri[70], "q46"),
            new Transition("q0", simboluri[71], "q46"),new Transition("q0", simboluri[72], "q46"),new Transition("q0", simboluri[73], "q46"),
            new Transition("q0", simboluri[74], "q46"),new Transition("q0", simboluri[75], "q46"),new Transition("q0", simboluri[76], "q46"),
            new Transition("q0", simboluri[77], "q46"),new Transition("q0", simboluri[78], "q46"),new Transition("q0", simboluri[79], "q46"),
            new Transition("q0", simboluri[80], "q46"),new Transition("q0", simboluri[81], "q46"),new Transition("q0", simboluri[82], "q46"),
            new Transition("q0", simboluri[83], "q46"),new Transition("q0", simboluri[84], "q46"),new Transition("q0", simboluri[85], "q46"),
            new Transition("q0", simboluri[86], "q46"),new Transition("q0", simboluri[87], "q46"),new Transition("q0", simboluri[88], "q46"),
            new Transition("q0", simboluri[89], "q46"),new Transition("q0", simboluri[90], "q46"),//Literele mari
            new Transition("q0", simboluri[33], "q46"),
            new Transition("q0", simboluri[34], "q46"),new Transition("q0", simboluri[35], "q46"),new Transition("q0", simboluri[36], "q46"),
            new Transition("q0", simboluri[37], "q46"),new Transition("q0", simboluri[38], "q46"),new Transition("q0", simboluri[39], "q46"),
            new Transition("q0", simboluri[40], "q46"),new Transition("q0", simboluri[41], "q46"),new Transition("q0", simboluri[42], "q46"),
            new Transition("q0", simboluri[43], "q46"),new Transition("q0", simboluri[44], "q46"),new Transition("q0", simboluri[45], "q46"),
            new Transition("q0", simboluri[46], "q46"),new Transition("q0", simboluri[47], "q46"),new Transition("q0", simboluri[48], "q46"),
            new Transition("q0", simboluri[49], "q46"),new Transition("q0", simboluri[50], "q46"),new Transition("q0", simboluri[51], "q46"),
            new Transition("q0", simboluri[52], "q46"),new Transition("q0", simboluri[53], "q46"),new Transition("q0", simboluri[54], "q46"),
            new Transition("q0", simboluri[55], "q46"),new Transition("q0", simboluri[56], "q46"),new Transition("q0", simboluri[57], "q46"),
            new Transition("q0", simboluri[58], "q46"),//Literele mici

            new Transition("q0", simboluri[95], "q47"),new Transition("q0", simboluri[96], "q47"),new Transition("q0", simboluri[97], "q47"),
            new Transition("q0", simboluri[98], "q47"),new Transition("q0", simboluri[99], "q47"),new Transition("q0", simboluri[100], "q47"),
            new Transition("q0", simboluri[101], "q47"),new Transition("q0", simboluri[0], "q47"),//Delimitatori " \n\r\a\b\t\v\f"

            new Transition("q2", simboluri[29], "q3"),//Operatori combinati cu +

            new Transition("q4", simboluri[6], "q5"),new Transition("q4", simboluri[29], "q6"),//&&, &=

            new Transition("q7", simboluri[11], "q8"),new Transition("q7", simboluri[29], "q9"),//++,+=
            new Transition("q7", simboluri[16], "q35"),new Transition("q7", simboluri[17], "q35"),new Transition("q7", simboluri[18], "q35"),
            new Transition("q7", simboluri[19], "q35"),new Transition("q7", simboluri[20], "q35"),new Transition("q7", simboluri[21], "q35"),
            new Transition("q7", simboluri[22], "q35"),new Transition("q7", simboluri[23], "q35"),new Transition("q7", simboluri[24], "q35"),
            new Transition("q7", simboluri[25], "q35"),//+10...

            new Transition("q10", simboluri[13], "q11"),new Transition("q10", simboluri[29], "q12"),new Transition("q10", simboluri[30], "q13"),//--,-=,->
            new Transition("q10", simboluri[16], "q35"),new Transition("q10", simboluri[17], "q35"),new Transition("q10", simboluri[18], "q35"),
            new Transition("q10", simboluri[19], "q35"),new Transition("q10", simboluri[20], "q35"),new Transition("q10", simboluri[21], "q35"),
            new Transition("q10", simboluri[22], "q35"),new Transition("q10", simboluri[23], "q35"),new Transition("q10", simboluri[24], "q35"),
            new Transition("q10", simboluri[25], "q35"),//-23etc...

             new Transition("q14", simboluri[28], "q15"),new Transition("q14", simboluri[29], "q16"),//<=,<<

            new Transition("q17", simboluri[29], "q18"),new Transition("q17", simboluri[30], "q19"),//>=,>>

            //Siruri de caractere.
            new Transition("q21", simboluri[2], "q23"),new Transition("q21", simboluri[60], "q24"),new Transition("q21", simboluri[36], "q22"),
            new Transition("q21", simboluri[3], "q22"),new Transition("q21", simboluri[4], "q22"),new Transition("q21", simboluri[8], "q22"),
            new Transition("q21", simboluri[9], "q22"),new Transition("q21", simboluri[12], "q22"),new Transition("q21", simboluri[26], "q22"),
            new Transition("q21", simboluri[27], "q22"),new Transition("q21", simboluri[31], "q22"),new Transition("q21", simboluri[59], "q22"),
            new Transition("q21", simboluri[61], "q22"),new Transition("q21", simboluri[63], "q22"),new Transition("q21", simboluri[64], "q22"),
            new Transition("q21", simboluri[91], "q22"),new Transition("q21", simboluri[93], "q22"),new Transition("q21", simboluri[94], "q22"),
            new Transition("q21", simboluri[95], "q22"),
            new Transition("q21", simboluri[1], "q22"),new Transition("q21", simboluri[10], "q22"),new Transition("q21", simboluri[15], "q22"),
            new Transition("q21", simboluri[29], "q22"),new Transition("q21", simboluri[62], "q22"),new Transition("q21", simboluri[5], "q22"),
            new Transition("q21", simboluri[6], "q22"),new Transition("q22", simboluri[36], "q22"),
            new Transition("q21", simboluri[11], "q22"),
            new Transition("q21", simboluri[13], "q22"),
            new Transition("q21", simboluri[28], "q22"),
            new Transition("q21", simboluri[30], "q22"),
            new Transition("q21", simboluri[14], "q22"),
            new Transition("q21", simboluri[7], "q22"),
            new Transition("q21", simboluri[32], "q22"),
            new Transition("q21", simboluri[63], "q22"),
            new Transition("q21", simboluri[16], "q22"),
            new Transition("q21", simboluri[17], "q22"),new Transition("q21", simboluri[18], "q22"),new Transition("q21", simboluri[19], "q22"),
            new Transition("q21", simboluri[20], "q22"),new Transition("q21", simboluri[21], "q22"),new Transition("q21", simboluri[22], "q22"),
            new Transition("q21", simboluri[23], "q22"),new Transition("q21", simboluri[24], "q22"),new Transition("q21", simboluri[25], "q22"),
            new Transition("q21", simboluri[65], "q22"),new Transition("q21", simboluri[66], "q22"),new Transition("q21", simboluri[67], "q22"),
            new Transition("q21", simboluri[68], "q22"),new Transition("q21", simboluri[69], "q22"),new Transition("q21", simboluri[70], "q22"),
            new Transition("q21", simboluri[71], "q22"),new Transition("q21", simboluri[72], "q22"),new Transition("q21", simboluri[73], "q22"),
            new Transition("q21", simboluri[74], "q22"),new Transition("q21", simboluri[75], "q22"),new Transition("q21", simboluri[76], "q22"),
            new Transition("q21", simboluri[77], "q22"),new Transition("q21", simboluri[78], "q22"),new Transition("q21", simboluri[79], "q22"),
            new Transition("q21", simboluri[80], "q22"),new Transition("q21", simboluri[81], "q22"),new Transition("q21", simboluri[82], "q22"),
            new Transition("q21", simboluri[83], "q22"),new Transition("q21", simboluri[84], "q22"),new Transition("q21", simboluri[85], "q22"),
            new Transition("q21", simboluri[86], "q22"),new Transition("q21", simboluri[87], "q22"),new Transition("q21", simboluri[88], "q22"),
            new Transition("q21", simboluri[89], "q22"),new Transition("q21", simboluri[90], "q22"),
            new Transition("q21", simboluri[33], "q22"),
            new Transition("q21", simboluri[34], "q22"),new Transition("q21", simboluri[35], "q22"),new Transition("q21", simboluri[36], "q22"),
            new Transition("q21", simboluri[37], "q22"),new Transition("q21", simboluri[38], "q22"),new Transition("q21", simboluri[39], "q22"),
            new Transition("q21", simboluri[40], "q22"),new Transition("q21", simboluri[41], "q22"),new Transition("q21", simboluri[42], "q22"),
            new Transition("q21", simboluri[43], "q22"),new Transition("q21", simboluri[44], "q22"),new Transition("q21", simboluri[45], "q22"),
            new Transition("q21", simboluri[46], "q22"),new Transition("q21", simboluri[47], "q22"),new Transition("q21", simboluri[48], "q22"),
            new Transition("q21", simboluri[49], "q22"),new Transition("q21", simboluri[50], "q22"),new Transition("q21", simboluri[51], "q22"),
            new Transition("q21", simboluri[52], "q22"),new Transition("q21", simboluri[53], "q22"),new Transition("q21", simboluri[54], "q22"),
            new Transition("q21", simboluri[55], "q22"),new Transition("q21", simboluri[56], "q22"),new Transition("q21", simboluri[57], "q22"),
            new Transition("q21", simboluri[58], "q22"),
            new Transition("q21", simboluri[95], "q22"),new Transition("q21", simboluri[96], "q22"),new Transition("q21", simboluri[97], "q22"),
            new Transition("q21", simboluri[98], "q22"),new Transition("q21", simboluri[99], "q22"),new Transition("q21", simboluri[101], "q22"),
            new Transition("q21", simboluri[0], "q22"),
            ////
            new Transition("q22", simboluri[2], "q23"),new Transition("q22", simboluri[60], "q24"),
            new Transition("q22", simboluri[3], "q22"),new Transition("q21", simboluri[4], "q22"),new Transition("q21", simboluri[8], "q22"),
            new Transition("q22", simboluri[9], "q22"),new Transition("q21", simboluri[12], "q22"),new Transition("q21", simboluri[26], "q22"),
            new Transition("q22", simboluri[27], "q22"),new Transition("q21", simboluri[31], "q22"),new Transition("q21", simboluri[59], "q22"),
            new Transition("q22", simboluri[61], "q22"),new Transition("q21", simboluri[63], "q22"),new Transition("q21", simboluri[64], "q22"),
            new Transition("q22", simboluri[91], "q22"),new Transition("q21", simboluri[93], "q22"),new Transition("q21", simboluri[94], "q22"),
            new Transition("q22", simboluri[95], "q22"),
            new Transition("q22", simboluri[1], "q22"),new Transition("q21", simboluri[10], "q22"),new Transition("q21", simboluri[15], "q22"),
            new Transition("q22", simboluri[29], "q22"),new Transition("q21", simboluri[62], "q22"),new Transition("q21", simboluri[5], "q22"),
            new Transition("q22", simboluri[6], "q22"),
            new Transition("q22", simboluri[11], "q22"),
            new Transition("q22", simboluri[13], "q22"),
            new Transition("q22", simboluri[73], "q22"),
            new Transition("q22", simboluri[28], "q22"),
            new Transition("q22", simboluri[78], "q22"),
            new Transition("q22", simboluri[30], "q22"),
            new Transition("q22", simboluri[14], "q22"),
            new Transition("q22", simboluri[2], "q23"),
            new Transition("q22", simboluri[7], "q22"),
            new Transition("q22", simboluri[32], "q22"),
            new Transition("q22", simboluri[63], "q22"),
            new Transition("q22", simboluri[16], "q22"),
            new Transition("q22", simboluri[17], "q22"),new Transition("q22", simboluri[18], "q22"),new Transition("q22", simboluri[19], "q22"),
            new Transition("q22", simboluri[20], "q22"),new Transition("q22", simboluri[21], "q22"),new Transition("q22", simboluri[22], "q22"),
            new Transition("q22", simboluri[23], "q22"),new Transition("q22", simboluri[24], "q22"),new Transition("q22", simboluri[25], "q22"),
            new Transition("q22", simboluri[65], "q22"),new Transition("q22", simboluri[66], "q22"),new Transition("q22", simboluri[67], "q22"),
            new Transition("q22", simboluri[68], "q22"),new Transition("q22", simboluri[69], "q22"),new Transition("q22", simboluri[70], "q2"),
            new Transition("q22", simboluri[71], "q22"),new Transition("q22", simboluri[72], "q22"),new Transition("q22", simboluri[73], "q22"),
            new Transition("q22", simboluri[74], "q22"),new Transition("q22", simboluri[75], "q22"),new Transition("q22", simboluri[76], "q22"),
            new Transition("q22", simboluri[77], "q22"),new Transition("q22", simboluri[78], "q22"),new Transition("q22", simboluri[79], "q22"),
            new Transition("q22", simboluri[80], "q22"),new Transition("q22", simboluri[81], "q22"),new Transition("q22", simboluri[82], "q22"),
            new Transition("q22", simboluri[83], "q22"),new Transition("q22", simboluri[84], "q22"),new Transition("q22", simboluri[85], "q22"),
            new Transition("q22", simboluri[86], "q22"),new Transition("q22", simboluri[87], "q22"),new Transition("q22", simboluri[88], "q22"),
            new Transition("q22", simboluri[89], "q22"),new Transition("q22", simboluri[90], "q22"),
            new Transition("q22", simboluri[33], "q22"),
            new Transition("q22", simboluri[34], "q22"),new Transition("q21", simboluri[35], "q22"),new Transition("q21", simboluri[36], "q22"),
            new Transition("q22", simboluri[37], "q22"),new Transition("q21", simboluri[38], "q22"),new Transition("q21", simboluri[39], "q22"),
            new Transition("q22", simboluri[40], "q22"),new Transition("q21", simboluri[41], "q22"),new Transition("q21", simboluri[42], "q22"),
            new Transition("q22", simboluri[43], "q22"),new Transition("q21", simboluri[44], "q22"),new Transition("q21", simboluri[45], "q22"),
            new Transition("q22", simboluri[46], "q22"),new Transition("q21", simboluri[47], "q22"),new Transition("q21", simboluri[48], "q22"),
            new Transition("q22", simboluri[49], "q22"),new Transition("q21", simboluri[50], "q22"),new Transition("q21", simboluri[51], "q22"),
            new Transition("q22", simboluri[52], "q22"),new Transition("q21", simboluri[53], "q22"),new Transition("q21", simboluri[54], "q22"),
            new Transition("q22", simboluri[55], "q22"),new Transition("q21", simboluri[56], "q22"),new Transition("q21", simboluri[57], "q22"),
            new Transition("q22", simboluri[58], "q22"),
            new Transition("q22", simboluri[95], "q22"),new Transition("q21", simboluri[96], "q22"),new Transition("q21", simboluri[97], "q22"),
            new Transition("q22", simboluri[98], "q22"),new Transition("q21", simboluri[99], "q22"),new Transition("q21", simboluri[101], "q22"),
            new Transition("q22", simboluri[0], "q22"),
            new Transition("q22", simboluri[65], "q22"),new Transition("q22", simboluri[66], "q22"),new Transition("q22", simboluri[67], "q22"),
            new Transition("q22", simboluri[68], "q22"),new Transition("q22", simboluri[69], "q22"),new Transition("q22", simboluri[70], "q22"),
            new Transition("q22", simboluri[71], "q22"),new Transition("q22", simboluri[72], "q22"),new Transition("q22", simboluri[73], "q22"),
            new Transition("q22", simboluri[74], "q22"),new Transition("q22", simboluri[75], "q22"),new Transition("q22", simboluri[76], "q22"),
            new Transition("q22", simboluri[77], "q22"),new Transition("q22", simboluri[78], "q22"),new Transition("q22", simboluri[79], "q22"),
            new Transition("q22", simboluri[80], "q22"),new Transition("q22", simboluri[81], "q22"),new Transition("q22", simboluri[82], "q22"),
            new Transition("q22", simboluri[83], "q22"),new Transition("q22", simboluri[84], "q22"),new Transition("q22", simboluri[85], "q22"),
            new Transition("q22", simboluri[86], "q22"),new Transition("q22", simboluri[87], "q22"),new Transition("q22", simboluri[88], "q22"),
            new Transition("q22", simboluri[89], "q22"),new Transition("q22", simboluri[90], "q22"),

            new Transition("q24", simboluri[2], "q22"),new Transition("q24", simboluri[7], "q22"),new Transition("q24", simboluri[65], "q22"),
            new Transition("q24", simboluri[66], "q22"),new Transition("q24", simboluri[70], "q22"),new Transition("q24", simboluri[78], "q22"),
            new Transition("q24", simboluri[82], "q22"),new Transition("q24", simboluri[84], "q22"),new Transition("q24", simboluri[86], "q22"),

            ////Siruri de caractere

            ////Constante caracter.
            new Transition("q25", simboluri[7], "q26"),new Transition("q25", simboluri[60], "q48"),
            new Transition("q25", simboluri[3], "q26"),new Transition("q25", simboluri[4], "q26"),new Transition("q25", simboluri[8], "q26"),
            new Transition("q25", simboluri[9], "q26"),new Transition("q25", simboluri[12], "q26"),new Transition("q25", simboluri[26], "q26"),
            new Transition("q25", simboluri[27], "q26"),new Transition("q25", simboluri[31], "q26"),new Transition("q25", simboluri[59], "q26"),
            new Transition("q25", simboluri[61], "q26"),new Transition("q25", simboluri[63], "q26"),new Transition("q25", simboluri[64], "q26"),
            new Transition("q25", simboluri[91], "q26"),new Transition("q25", simboluri[93], "q26"),new Transition("q25", simboluri[94], "q26"),
            new Transition("q25", simboluri[95], "q26"),
            new Transition("q25", simboluri[1], "q26"),new Transition("q25", simboluri[79], "q26"),new Transition("q25", simboluri[15], "q26"),
            new Transition("q25", simboluri[29], "q26"),new Transition("q25", simboluri[62], "q26"),new Transition("q25", simboluri[5], "q26"),
            new Transition("q25", simboluri[6], "q26"),
            new Transition("q25", simboluri[11], "q26"),
            new Transition("q25", simboluri[13], "q26"),
            new Transition("q25", simboluri[28], "q26"),
            new Transition("q25", simboluri[30], "q26"),
            new Transition("q25", simboluri[14], "q26"),
            new Transition("q25", simboluri[2], "q26"),
            new Transition("q25", simboluri[32], "q26"),
            new Transition("q25", simboluri[63], "q26"),
            new Transition("q25", simboluri[16], "q26"),
            new Transition("q25", simboluri[17], "q26"),new Transition("q25", simboluri[18], "q26"),new Transition("q25", simboluri[19], "q26"),
            new Transition("q25", simboluri[20], "q26"),new Transition("q25", simboluri[21], "q26"),new Transition("q25", simboluri[22], "q26"),
            new Transition("q25", simboluri[23], "q26"),new Transition("q25", simboluri[24], "q26"),new Transition("q25", simboluri[25], "q26"),
            new Transition("q25", simboluri[65], "q26"),new Transition("q25", simboluri[66], "q26"),new Transition("q25", simboluri[67], "q26"),
            new Transition("q25", simboluri[68], "q26"),new Transition("q25", simboluri[69], "q26"),new Transition("q25", simboluri[70], "q26"),
            new Transition("q25", simboluri[71], "q26"),new Transition("q25", simboluri[72], "q26"),new Transition("q25", simboluri[73], "q26"),
            new Transition("q25", simboluri[74], "q26"),new Transition("q25", simboluri[75], "q26"),new Transition("q25", simboluri[76], "q26"),
            new Transition("q25", simboluri[77], "q26"),new Transition("q25", simboluri[78], "q26"),new Transition("q25", simboluri[79], "q26"),
            new Transition("q25", simboluri[80], "q26"),new Transition("q25", simboluri[81], "q26"),new Transition("q25", simboluri[82], "q26"),
            new Transition("q25", simboluri[83], "q26"),new Transition("q25", simboluri[84], "q26"),new Transition("q25", simboluri[85], "q26"),
            new Transition("q25", simboluri[86], "q26"),new Transition("q25", simboluri[87], "q26"),new Transition("q25", simboluri[88], "q26"),
            new Transition("q25", simboluri[89], "q26"),new Transition("q25", simboluri[90], "q26"),
            new Transition("q25", simboluri[33], "q26"),
            new Transition("q25", simboluri[34], "q26"),new Transition("q25", simboluri[35], "q26"),new Transition("q25", simboluri[36], "q26"),
            new Transition("q25", simboluri[37], "q26"),new Transition("q25", simboluri[38], "q26"),new Transition("q25", simboluri[39], "q26"),
            new Transition("q25", simboluri[40], "q26"),new Transition("q25", simboluri[41], "q26"),new Transition("q25", simboluri[42], "q26"),
            new Transition("q25", simboluri[43], "q26"),new Transition("q25", simboluri[44], "q26"),new Transition("q25", simboluri[45], "q26"),
            new Transition("q25", simboluri[46], "q26"),new Transition("q25", simboluri[47], "q26"),new Transition("q25", simboluri[48], "q26"),
            new Transition("q25", simboluri[49], "q26"),new Transition("q25", simboluri[50], "q26"),new Transition("q25", simboluri[51], "q26"),
            new Transition("q25", simboluri[52], "q26"),new Transition("q25", simboluri[53], "q26"),new Transition("q25", simboluri[54], "q26"),
            new Transition("q25", simboluri[55], "q26"),new Transition("q25", simboluri[56], "q26"),new Transition("q25", simboluri[57], "q26"),
            new Transition("q25", simboluri[58], "q26"),
            new Transition("q25", simboluri[95], "q26"),new Transition("q25", simboluri[96], "q26"),new Transition("q25", simboluri[97], "q26"),
            new Transition("q25", simboluri[98], "q26"),new Transition("q25", simboluri[99], "q26"),new Transition("q25", simboluri[101], "q26"),
            new Transition("q25", simboluri[0], "q26"),

            new Transition("q48", simboluri[2], "q26"),new Transition("q48", simboluri[7], "q26"),new Transition("q48", simboluri[65], "q26"),
            new Transition("q48", simboluri[66], "q26"),new Transition("q48", simboluri[70], "q26"),new Transition("q48", simboluri[78], "q26"),
            new Transition("q48", simboluri[82], "q26"),new Transition("q48", simboluri[84], "q26"),new Transition("q48", simboluri[86], "q26"),

            new Transition("q26", simboluri[7], "q27"),
            //Constante caracter.

            ////Siruri verbatim.
            new Transition("q28", simboluri[2], "q29"),
            new Transition("q29", simboluri[2], "q30"),new Transition("q29", simboluri[60], "q29"),
            new Transition("q29", simboluri[3], "q29"),new Transition("q29", simboluri[4], "q29"),new Transition("q29", simboluri[8], "q29"),
            new Transition("q29", simboluri[9], "q29"),new Transition("q29", simboluri[12], "q29"),new Transition("q29", simboluri[26], "q29"),
            new Transition("q29", simboluri[27], "q29"),new Transition("q29", simboluri[31], "q29"),new Transition("q29", simboluri[59], "q29"),
            new Transition("q29", simboluri[61], "q29"),new Transition("q29", simboluri[63], "q29"),new Transition("q29", simboluri[64], "q29"),
            new Transition("q29", simboluri[91], "q29"),new Transition("q29", simboluri[93], "q29"),new Transition("q29", simboluri[94], "q29"),
            new Transition("q29", simboluri[95], "q29"),
            new Transition("q29", simboluri[1], "q29"),new Transition("q29", simboluri[10], "q29"),new Transition("q29", simboluri[15], "q29"),
            new Transition("q29", simboluri[29], "q29"),new Transition("q29", simboluri[62], "q29"),new Transition("q29", simboluri[5], "q29"),
            new Transition("q29", simboluri[6], "q29"),
            new Transition("q29", simboluri[11], "q29"),
            new Transition("q29", simboluri[13], "q29"),
            new Transition("q29", simboluri[28], "q29"),
            new Transition("q29", simboluri[30], "q29"),
            new Transition("q29", simboluri[14], "q29"),
            new Transition("q29", simboluri[7], "q29"),
            new Transition("q29", simboluri[32], "q29"),
            new Transition("q29", simboluri[63], "q29"),
            new Transition("q29", simboluri[16], "q29"),
            new Transition("q29", simboluri[17], "q29"),new Transition("q29", simboluri[18], "q29"),new Transition("q29", simboluri[19], "q29"),
            new Transition("q29", simboluri[20], "q29"),new Transition("q29", simboluri[21], "q29"),new Transition("q29", simboluri[22], "q29"),
            new Transition("q29", simboluri[23], "q29"),new Transition("q29", simboluri[24], "q29"),new Transition("q29", simboluri[25], "q29"),
            new Transition("q29", simboluri[65], "q29"),new Transition("q29", simboluri[66], "q29"),new Transition("q29", simboluri[67], "q29"),
            new Transition("q29", simboluri[68], "q29"),new Transition("q29", simboluri[69], "q29"),new Transition("q29", simboluri[70], "q29"),
            new Transition("q29", simboluri[71], "q29"),new Transition("q29", simboluri[72], "q29"),new Transition("q29", simboluri[73], "q29"),
            new Transition("q29", simboluri[74], "q29"),new Transition("q29", simboluri[75], "q29"),new Transition("q29", simboluri[76], "q29"),
            new Transition("q29", simboluri[77], "q29"),new Transition("q29", simboluri[78], "q29"),new Transition("q29", simboluri[79], "q29"),
            new Transition("q29", simboluri[80], "q29"),new Transition("q29", simboluri[81], "q29"),new Transition("q29", simboluri[82], "q29"),
            new Transition("q29", simboluri[83], "q29"),new Transition("q29", simboluri[84], "q29"),new Transition("q29", simboluri[85], "q29"),
            new Transition("q29", simboluri[86], "q29"),new Transition("q29", simboluri[87], "q29"),new Transition("q29", simboluri[88], "q29"),
            new Transition("q29", simboluri[89], "q29"),new Transition("q29", simboluri[90], "q29"),
            new Transition("q29", simboluri[33], "q29"),
            new Transition("q29", simboluri[34], "q29"),new Transition("q29", simboluri[35], "q29"),new Transition("q29", simboluri[36], "q29"),
            new Transition("q29", simboluri[37], "q29"),new Transition("q29", simboluri[38], "q29"),new Transition("q29", simboluri[39], "q29"),
            new Transition("q29", simboluri[40], "q29"),new Transition("q29", simboluri[41], "q29"),new Transition("q29", simboluri[42], "q29"),
            new Transition("q29", simboluri[43], "q29"),new Transition("q29", simboluri[44], "q29"),new Transition("q29", simboluri[45], "q29"),
            new Transition("q29", simboluri[46], "q29"),new Transition("q29", simboluri[47], "q29"),new Transition("q29", simboluri[48], "q29"),
            new Transition("q29", simboluri[49], "q29"),new Transition("q29", simboluri[50], "q29"),new Transition("q29", simboluri[51], "q29"),
            new Transition("q29", simboluri[52], "q29"),new Transition("q29", simboluri[53], "q29"),new Transition("q29", simboluri[54], "q29"),
            new Transition("q29", simboluri[55], "q29"),new Transition("q29", simboluri[56], "q29"),new Transition("q29", simboluri[57], "q29"),
            new Transition("q29", simboluri[58], "q29"),
            new Transition("q29", simboluri[95], "q29"),new Transition("q29", simboluri[96], "q29"),new Transition("q29", simboluri[97], "q29"),
            new Transition("q29", simboluri[98], "q29"),new Transition("q29", simboluri[99], "q29"),new Transition("q29", simboluri[101], "q29"),
            new Transition("q29", simboluri[0], "q29"),
            ////Siruri verbatim.

            ////Identificatori care au in componenta @.
            new Transition("q28", simboluri[65], "q31"),new Transition("q28", simboluri[66], "q31"),new Transition("q28", simboluri[67], "q31"),
            new Transition("q28", simboluri[68], "q31"),new Transition("q28", simboluri[69], "q31"),new Transition("q28", simboluri[70], "q31"),
            new Transition("q28", simboluri[71], "q31"),new Transition("q28", simboluri[72], "q31"),new Transition("q28", simboluri[73], "q31"),
            new Transition("q28", simboluri[74], "q31"),new Transition("q28", simboluri[75], "q31"),new Transition("q28", simboluri[76], "q31"),
            new Transition("q28", simboluri[77], "q31"),new Transition("q28", simboluri[78], "q31"),new Transition("q28", simboluri[79], "q31"),
            new Transition("q28", simboluri[80], "q31"),new Transition("q28", simboluri[81], "q31"),new Transition("q28", simboluri[82], "q31"),
            new Transition("q28", simboluri[83], "q31"),new Transition("q28", simboluri[84], "q31"),new Transition("q28", simboluri[85], "q31"),
            new Transition("q28", simboluri[86], "q31"),new Transition("q28", simboluri[87], "q31"),new Transition("q28", simboluri[88], "q31"),
            new Transition("q28", simboluri[89], "q31"),new Transition("q28", simboluri[90], "q31"),
            new Transition("q28", simboluri[33], "q31"),
            new Transition("q28", simboluri[34], "q31"),new Transition("q28", simboluri[35], "q31"),new Transition("q28", simboluri[36], "q31"),
            new Transition("q28", simboluri[37], "q31"),new Transition("q28", simboluri[38], "q31"),new Transition("q28", simboluri[39], "q31"),
            new Transition("q28", simboluri[40], "q31"),new Transition("q28", simboluri[41], "q31"),new Transition("q28", simboluri[42], "q31"),
            new Transition("q28", simboluri[43], "q31"),new Transition("q28", simboluri[44], "q31"),new Transition("q28", simboluri[45], "q31"),
            new Transition("q28", simboluri[46], "q31"),new Transition("q28", simboluri[47], "q31"),new Transition("q28", simboluri[48], "q31"),
            new Transition("q28", simboluri[49], "q31"),new Transition("q28", simboluri[50], "q31"),new Transition("q28", simboluri[51], "q31"),
            new Transition("q28", simboluri[52], "q31"),new Transition("q28", simboluri[53], "q31"),new Transition("q28", simboluri[54], "q31"),
            new Transition("q28", simboluri[55], "q31"),new Transition("q28", simboluri[56], "q31"),new Transition("q28", simboluri[57], "q31"),
            new Transition("q28", simboluri[58], "q31"),new Transition("q28", simboluri[0], "q49"),
            ////Identificatori care au in componenta @.

            ////Identificatori.
            new Transition("q31", simboluri[16], "q31"),new Transition("q31", simboluri[0], "q49"),new Transition("q46", simboluri[0], "q49"),
            new Transition("q31", simboluri[17], "q31"),new Transition("q31", simboluri[18], "q31"),new Transition("q31", simboluri[19], "q31"),
            new Transition("q31", simboluri[20], "q31"),new Transition("q31", simboluri[21], "q31"),new Transition("q31", simboluri[22], "q31"),
            new Transition("q31", simboluri[23], "q31"),new Transition("q31", simboluri[24], "q31"),new Transition("q31", simboluri[25], "q31"),
            new Transition("q31", simboluri[65], "q31"),new Transition("q31", simboluri[66], "q31"),new Transition("q31", simboluri[67], "q31"),
            new Transition("q31", simboluri[68], "q31"),new Transition("q31", simboluri[69], "q31"),new Transition("q31", simboluri[70], "q31"),
            new Transition("q31", simboluri[71], "q31"),new Transition("q31", simboluri[72], "q31"),new Transition("q31", simboluri[73], "q31"),
            new Transition("q31", simboluri[74], "q31"),new Transition("q31", simboluri[75], "q31"),new Transition("q31", simboluri[76], "q31"),
            new Transition("q31", simboluri[77], "q31"),new Transition("q31", simboluri[78], "q31"),new Transition("q31", simboluri[79], "q31"),
            new Transition("q31", simboluri[80], "q31"),new Transition("q31", simboluri[81], "q31"),new Transition("q31", simboluri[82], "q31"),
            new Transition("q31", simboluri[83], "q31"),new Transition("q31", simboluri[84], "q31"),new Transition("q31", simboluri[85], "q31"),
            new Transition("q31", simboluri[86], "q31"),new Transition("q31", simboluri[87], "q31"),new Transition("q31", simboluri[88], "q31"),
            new Transition("q31", simboluri[89], "q31"),new Transition("q31", simboluri[90], "q31"),
            new Transition("q31", simboluri[33], "q31"),
            new Transition("q31", simboluri[34], "q31"),new Transition("q31", simboluri[35], "q31"),new Transition("q31", simboluri[36], "q31"),
            new Transition("q31", simboluri[37], "q31"),new Transition("q31", simboluri[38], "q31"),new Transition("q31", simboluri[39], "q31"),
            new Transition("q31", simboluri[40], "q31"),new Transition("q31", simboluri[41], "q31"),new Transition("q31", simboluri[42], "q31"),
            new Transition("q31", simboluri[43], "q31"),new Transition("q31", simboluri[44], "q31"),new Transition("q31", simboluri[45], "q31"),
            new Transition("q31", simboluri[46], "q31"),new Transition("q31", simboluri[47], "q31"),new Transition("q31", simboluri[48], "q31"),
            new Transition("q31", simboluri[49], "q31"),new Transition("q31", simboluri[50], "q31"),new Transition("q31", simboluri[51], "q31"),
            new Transition("q31", simboluri[52], "q31"),new Transition("q31", simboluri[53], "q31"),new Transition("q31", simboluri[54], "q31"),
            new Transition("q31", simboluri[55], "q31"),new Transition("q31", simboluri[56], "q31"),new Transition("q31", simboluri[57], "q31"),
            new Transition("q31", simboluri[58], "q31"),

            new Transition("q32", simboluri[16], "q33"),
            new Transition("q32", simboluri[65], "q33"),new Transition("q32", simboluri[66], "q33"),new Transition("q32", simboluri[67], "q33"),
            new Transition("q32", simboluri[68], "q33"),new Transition("q32", simboluri[69], "q33"),new Transition("q32", simboluri[70], "q33"),
            new Transition("q32", simboluri[71], "q33"),new Transition("q32", simboluri[72], "q33"),new Transition("q32", simboluri[73], "q33"),
            new Transition("q32", simboluri[74], "q33"),new Transition("q32", simboluri[75], "q33"),new Transition("q32", simboluri[76], "q33"),
            new Transition("q32", simboluri[77], "q33"),new Transition("q32", simboluri[78], "q33"),new Transition("q32", simboluri[79], "q33"),
            new Transition("q32", simboluri[80], "q33"),new Transition("q32", simboluri[81], "q33"),new Transition("q32", simboluri[82], "q33"),
            new Transition("q32", simboluri[83], "q33"),new Transition("q32", simboluri[84], "q33"),new Transition("q32", simboluri[85], "q33"),
            new Transition("q32", simboluri[86], "q33"),new Transition("q32", simboluri[87], "q33"),new Transition("q32", simboluri[88], "q33"),
            new Transition("q32", simboluri[89], "q33"),new Transition("q32", simboluri[90], "q33"),
            new Transition("q32", simboluri[33], "q33"),
            new Transition("q32", simboluri[34], "q33"),new Transition("q32", simboluri[35], "q33"),new Transition("q32", simboluri[36], "q33"),
            new Transition("q32", simboluri[37], "q33"),new Transition("q32", simboluri[38], "q33"),new Transition("q32", simboluri[39], "q33"),
            new Transition("q32", simboluri[40], "q33"),new Transition("q32", simboluri[41], "q33"),new Transition("q32", simboluri[42], "q33"),
            new Transition("q32", simboluri[43], "q33"),new Transition("q32", simboluri[44], "q33"),new Transition("q32", simboluri[45], "q33"),
            new Transition("q32", simboluri[46], "q33"),new Transition("q32", simboluri[47], "q33"),new Transition("q32", simboluri[48], "q33"),
            new Transition("q32", simboluri[49], "q33"),new Transition("q32", simboluri[50], "q33"),new Transition("q32", simboluri[51], "q33"),
            new Transition("q32", simboluri[52], "q33"),new Transition("q32", simboluri[53], "q33"),new Transition("q32", simboluri[54], "q33"),
            new Transition("q32", simboluri[55], "q33"),new Transition("q32", simboluri[56], "q33"),new Transition("q32", simboluri[57], "q33"),
            new Transition("q32", simboluri[58], "q33"),
            new Transition("q32", simboluri[17], "q33"),new Transition("q32", simboluri[18], "q33"),new Transition("q32", simboluri[19], "q33"),
            new Transition("q32", simboluri[20], "q33"),new Transition("q32", simboluri[21], "q33"),new Transition("q32", simboluri[22], "q33"),
            new Transition("q32", simboluri[23], "q33"),new Transition("q32", simboluri[24], "q33"),new Transition("q32", simboluri[25], "q33"),


            new Transition("q33", simboluri[17], "q33"),new Transition("q33", simboluri[18], "q33"),new Transition("q33", simboluri[19], "q33"),
            new Transition("q33", simboluri[20], "q33"),new Transition("q33", simboluri[21], "q33"),new Transition("q33", simboluri[22], "q33"),
            new Transition("q33", simboluri[23], "q33"),new Transition("q33", simboluri[24], "q33"),new Transition("q33", simboluri[25], "q33"),
            new Transition("q33", simboluri[65], "q33"),new Transition("q33", simboluri[66], "q33"),new Transition("q33", simboluri[67], "q33"),
            new Transition("q33", simboluri[68], "q33"),new Transition("q33", simboluri[69], "q33"),new Transition("q33", simboluri[70], "q33"),
            new Transition("q33", simboluri[71], "q33"),new Transition("q33", simboluri[72], "q33"),new Transition("q33", simboluri[73], "q33"),
            new Transition("q33", simboluri[74], "q33"),new Transition("q33", simboluri[75], "q33"),new Transition("q33", simboluri[76], "q33"),
            new Transition("q33", simboluri[77], "q33"),new Transition("q33", simboluri[78], "q33"),new Transition("q33", simboluri[79], "q33"),
            new Transition("q33", simboluri[80], "q33"),new Transition("q33", simboluri[81], "q33"),new Transition("q33", simboluri[82], "q33"),
            new Transition("q33", simboluri[83], "q33"),new Transition("q33", simboluri[84], "q33"),new Transition("q33", simboluri[85], "q33"),
            new Transition("q33", simboluri[86], "q33"),new Transition("q33", simboluri[87], "q33"),new Transition("q33", simboluri[88], "q33"),
            new Transition("q33", simboluri[89], "q33"),new Transition("q33", simboluri[90], "q33"),
            new Transition("q33", simboluri[33], "q33"),
            new Transition("q33", simboluri[34], "q33"),new Transition("q33", simboluri[35], "q33"),new Transition("q33", simboluri[36], "q33"),
            new Transition("q33", simboluri[37], "q33"),new Transition("q33", simboluri[38], "q33"),new Transition("q33", simboluri[39], "q33"),
            new Transition("q33", simboluri[40], "q33"),new Transition("q33", simboluri[41], "q33"),new Transition("q33", simboluri[42], "q33"),
            new Transition("q33", simboluri[43], "q33"),new Transition("q33", simboluri[44], "q33"),new Transition("q33", simboluri[45], "q33"),
            new Transition("q33", simboluri[46], "q33"),new Transition("q33", simboluri[47], "q33"),new Transition("q33", simboluri[48], "q33"),
            new Transition("q33", simboluri[49], "q33"),new Transition("q33", simboluri[50], "q33"),new Transition("q33", simboluri[51], "q33"),
            new Transition("q33", simboluri[52], "q33"),new Transition("q33", simboluri[53], "q33"),new Transition("q33", simboluri[54], "q33"),
            new Transition("q33", simboluri[55], "q33"),new Transition("q33", simboluri[56], "q33"),new Transition("q33", simboluri[57], "q33"),
            new Transition("q33", simboluri[58], "q33"),

            new Transition("q46", simboluri[16], "q46"),
            new Transition("q46", simboluri[17], "q46"),new Transition("q46", simboluri[18], "q46"),new Transition("q46", simboluri[19], "q46"),
            new Transition("q46", simboluri[20], "q46"),new Transition("q46", simboluri[21], "q46"),new Transition("q46", simboluri[22], "q46"),
            new Transition("q46", simboluri[23], "q46"),new Transition("q46", simboluri[24], "q46"),new Transition("q46", simboluri[25], "q46"),
            new Transition("q46", simboluri[65], "q46"),new Transition("q46", simboluri[66], "q46"),new Transition("q46", simboluri[67], "q46"),
            new Transition("q46", simboluri[68], "q46"),new Transition("q46", simboluri[69], "q46"),new Transition("q46", simboluri[70], "q46"),
            new Transition("q46", simboluri[71], "q46"),new Transition("q46", simboluri[72], "q46"),new Transition("q46", simboluri[73], "q46"),
            new Transition("q46", simboluri[74], "q46"),new Transition("q46", simboluri[75], "q46"),new Transition("q46", simboluri[76], "q46"),
            new Transition("q46", simboluri[77], "q46"),new Transition("q46", simboluri[78], "q46"),new Transition("q46", simboluri[79], "q46"),
            new Transition("q46", simboluri[80], "q46"),new Transition("q46", simboluri[81], "q46"),new Transition("q46", simboluri[82], "q46"),
            new Transition("q46", simboluri[83], "q46"),new Transition("q46", simboluri[84], "q46"),new Transition("q46", simboluri[85], "q46"),
            new Transition("q46", simboluri[86], "q46"),new Transition("q46", simboluri[87], "q46"),new Transition("q46", simboluri[88], "q46"),
            new Transition("q46", simboluri[89], "q46"),new Transition("q46", simboluri[90], "q46"),
            new Transition("q46", simboluri[33], "q46"),
            new Transition("q46", simboluri[34], "q46"),new Transition("q46", simboluri[35], "q46"),new Transition("q46", simboluri[36], "q46"),
            new Transition("q46", simboluri[37], "q46"),new Transition("q46", simboluri[38], "q46"),new Transition("q46", simboluri[39], "q46"),
            new Transition("q46", simboluri[40], "q46"),new Transition("q46", simboluri[41], "q46"),new Transition("q46", simboluri[42], "q46"),
            new Transition("q46", simboluri[43], "q46"),new Transition("q46", simboluri[44], "q46"),new Transition("q46", simboluri[45], "q46"),
            new Transition("q46", simboluri[46], "q46"),new Transition("q46", simboluri[47], "q46"),new Transition("q46", simboluri[48], "q46"),
            new Transition("q46", simboluri[49], "q46"),new Transition("q46", simboluri[50], "q46"),new Transition("q46", simboluri[51], "q46"),
            new Transition("q46", simboluri[52], "q46"),new Transition("q46", simboluri[53], "q46"),new Transition("q46", simboluri[54], "q46"),
            new Transition("q46", simboluri[55], "q46"),new Transition("q46", simboluri[56], "q46"),new Transition("q46", simboluri[57], "q46"),
            new Transition("q46", simboluri[58], "q46"),new Transition("q46", simboluri[63], "q46"),
            ////Identificatori.

            ////Constante intregi.
            new Transition("q34", simboluri[16], "q34"),
            new Transition("q34", simboluri[17], "q35"),new Transition("q34", simboluri[18], "q35"),new Transition("q34", simboluri[19], "q35"),
            new Transition("q34", simboluri[20], "q35"),new Transition("q34", simboluri[21], "q35"),new Transition("q34", simboluri[22], "q35"),
            new Transition("q34", simboluri[23], "q35"),new Transition("q34", simboluri[24], "q35"),new Transition("q34", simboluri[25], "q35"),//cifrele de la 0 la 9.
            new Transition("q34", simboluri[56], "q35"),new Transition("q34", simboluri[88], "q35"),//0x 0X.
            new Transition("q34", simboluri[14], "q40"),//0.___.
            new Transition("q35", simboluri[14], "q40"),//[1-9]*.___.
            new Transition("q35", simboluri[16], "q35"),
            new Transition("q35", simboluri[17], "q35"),new Transition("q35", simboluri[18], "q35"),new Transition("q35", simboluri[19], "q35"),
            new Transition("q35", simboluri[20], "q35"),new Transition("q35", simboluri[21], "q35"),new Transition("q35", simboluri[22], "q35"),
            new Transition("q35", simboluri[23], "q35"),new Transition("q35", simboluri[24], "q35"),new Transition("q35", simboluri[25], "q35"),
            new Transition("q35", simboluri[53], "q36"),new Transition("q35", simboluri[58], "q36"),//uU
            new Transition("q35", simboluri[44], "q38"),new Transition("q35", simboluri[76], "q38"),//lL
            new Transition("q36", simboluri[44], "q37"),new Transition("q36", simboluri[76], "q37"),
            new Transition("q38", simboluri[53], "q39"),new Transition("q38", simboluri[85], "q39"),
            ////Constante intregi.

            ////Constante reale.
            new Transition("q40", simboluri[16], "q41"),
            new Transition("q40", simboluri[17], "q41"),new Transition("q40", simboluri[18], "q41"),new Transition("q40", simboluri[19], "q41"),
            new Transition("q40", simboluri[20], "q41"),new Transition("q40", simboluri[21], "q41"),new Transition("q40", simboluri[22], "q41"),
            new Transition("q40", simboluri[23], "q41"),new Transition("q40", simboluri[24], "q41"),new Transition("q40", simboluri[25], "q41"),
            new Transition("q41", simboluri[16], "q41"),
            new Transition("q41", simboluri[17], "q41"),new Transition("q41", simboluri[18], "q41"),new Transition("q41", simboluri[19], "q41"),
            new Transition("q41", simboluri[20], "q41"),new Transition("q41", simboluri[21], "q41"),new Transition("q41", simboluri[22], "q41"),
            new Transition("q41", simboluri[23], "q41"),new Transition("q41", simboluri[24], "q41"),new Transition("q41", simboluri[25], "q41"),

            new Transition("q41", simboluri[37], "q42"),new Transition("q41", simboluri[69], "q42"),new Transition("q41", simboluri[68], "q45"),
            new Transition("q41", simboluri[70], "q45"),new Transition("q41", simboluri[77], "q45"),new Transition("q41", simboluri[36], "q45"),
            new Transition("q41", simboluri[38], "q45"),new Transition("q41", simboluri[45], "q45"),

            new Transition("q42", simboluri[11], "q43"),new Transition("q42", simboluri[13], "q43"),
            new Transition("q43", simboluri[16], "q44"),
            new Transition("q43", simboluri[17], "q44"),new Transition("q43", simboluri[18], "q44"),new Transition("q43", simboluri[19], "q44"),
            new Transition("q43", simboluri[20], "q44"),new Transition("q43", simboluri[21], "q44"),new Transition("q43", simboluri[22], "q44"),
            new Transition("q43", simboluri[23], "q44"),new Transition("q43", simboluri[24], "q44"),new Transition("q43", simboluri[25], "q44"),

            new Transition("q44", simboluri[16], "q41"),
            new Transition("q44", simboluri[17], "q41"),new Transition("q44", simboluri[18], "q41"),new Transition("q44", simboluri[19], "q41"),
            new Transition("q44", simboluri[20], "q41"),new Transition("q44", simboluri[21], "q41"),new Transition("q44", simboluri[22], "q41"),
            new Transition("q44", simboluri[23], "q41"),new Transition("q44", simboluri[24], "q41"),new Transition("q44", simboluri[25], "q41"),
            new Transition("q41", simboluri[68], "q45"),
            new Transition("q41", simboluri[70], "q45"),new Transition("q41", simboluri[77], "q45"),new Transition("q41", simboluri[36], "q45"),
            new Transition("q41", simboluri[38], "q45"),new Transition("q41", simboluri[45], "q45"),
            ////Constante reale.

            //Comentarii.
            new Transition("q50", simboluri[10], "q51"),new Transition("q51", simboluri[10], "q52"),new Transition("q52", simboluri[15], "q53"),
            new Transition("q50",simboluri[29],"q54"),new Transition("q51",simboluri[60],"q51"),new Transition("q52",simboluri[60],"q51"),
             new Transition("q52", simboluri[3], "q51"),new Transition("q52", simboluri[4], "q51"),new Transition("q52", simboluri[8], "q51"),
            new Transition("q52", simboluri[9], "q51"),new Transition("q52", simboluri[12], "q51"),new Transition("q52", simboluri[26], "q51"),
            new Transition("q52", simboluri[27], "q51"),new Transition("q52", simboluri[31], "q51"),new Transition("q52", simboluri[59], "q51"),
            new Transition("q52", simboluri[61], "q51"),new Transition("q52", simboluri[64], "q51"),
            new Transition("q52", simboluri[91], "q51"),new Transition("q52", simboluri[93], "q51"),new Transition("q52", simboluri[94], "q51"),
            new Transition("q52", simboluri[95], "q51"),//Semne de punctuatie

            new Transition("q52", simboluri[1], "q51"),new Transition("q52", simboluri[10], "q51"),
            new Transition("q52", simboluri[29], "q51"),new Transition("q52", simboluri[62], "q51"),new Transition("q52", simboluri[5], "q51"),//Operatori

            new Transition("q52", simboluri[6], "q51"),//Ampersand

            new Transition("q52", simboluri[11], "q51"),//Plus

            new Transition("q52", simboluri[13], "q51"),//Minus

            new Transition("q52", simboluri[28], "q51"),//Mai mare

            new Transition("q52", simboluri[30], "q51"),//Mai mic

            new Transition("q52", simboluri[14], "q51"),//Punct

            new Transition("q52", simboluri[2], "q51"),//Ghilimele

            new Transition("q52", simboluri[7], "q51"),//Apostrof

            new Transition("q52", simboluri[32], "q51"),//@

            new Transition("q52", simboluri[63], "q51"),//_

            new Transition("q52", simboluri[16], "q51"),//zero

            new Transition("q52", simboluri[17], "q51"),new Transition("q52", simboluri[18], "q51"),new Transition("q52", simboluri[19], "q51"),
            new Transition("q52", simboluri[20], "q51"),new Transition("q52", simboluri[21], "q51"),new Transition("q52", simboluri[22], "q51"),
            new Transition("q52", simboluri[23], "q51"),new Transition("q52", simboluri[24], "q51"),new Transition("q52", simboluri[25], "q51"),//Cifrele de la 1 la 9

            new Transition("q52", simboluri[65], "q51"),new Transition("q52", simboluri[66], "q51"),new Transition("q52", simboluri[67], "q51"),
            new Transition("q52", simboluri[68], "q51"),new Transition("q52", simboluri[69], "q51"),new Transition("q52", simboluri[70], "q51"),
            new Transition("q52", simboluri[71], "q51"),new Transition("q52", simboluri[72], "q51"),new Transition("q52", simboluri[73], "q51"),
            new Transition("q52", simboluri[74], "q51"),new Transition("q52", simboluri[75], "q51"),new Transition("q52", simboluri[76], "q51"),
            new Transition("q52", simboluri[77], "q51"),new Transition("q52", simboluri[78], "q51"),new Transition("q52", simboluri[79], "q51"),
            new Transition("q52", simboluri[80], "q51"),new Transition("q52", simboluri[81], "q51"),new Transition("q52", simboluri[82], "q51"),
            new Transition("q52", simboluri[83], "q51"),new Transition("q52", simboluri[84], "q51"),new Transition("q52", simboluri[85], "q51"),
            new Transition("q52", simboluri[86], "q51"),new Transition("q52", simboluri[87], "q51"),new Transition("q52", simboluri[88], "q51"),
            new Transition("q52", simboluri[89], "q51"),new Transition("q52", simboluri[90], "q51"),//Literele mari
            new Transition("q52", simboluri[33], "q51"),
            new Transition("q52", simboluri[34], "q51"),new Transition("q52", simboluri[35], "q51"),new Transition("q52", simboluri[36], "q51"),
            new Transition("q52", simboluri[37], "q51"),new Transition("q52", simboluri[38], "q51"),new Transition("q52", simboluri[39], "q51"),
            new Transition("q52", simboluri[40], "q51"),new Transition("q52", simboluri[41], "q51"),new Transition("q52", simboluri[42], "q51"),
            new Transition("q52", simboluri[43], "q51"),new Transition("q52", simboluri[44], "q51"),new Transition("q52", simboluri[45], "q51"),
            new Transition("q52", simboluri[46], "q51"),new Transition("q52", simboluri[47], "q51"),new Transition("q52", simboluri[48], "q51"),
            new Transition("q52", simboluri[49], "q51"),new Transition("q52", simboluri[50], "q51"),new Transition("q52", simboluri[51], "q51"),
            new Transition("q52", simboluri[52], "q51"),new Transition("q52", simboluri[53], "q51"),new Transition("q52", simboluri[54], "q51"),
            new Transition("q52", simboluri[55], "q51"),new Transition("q52", simboluri[56], "q51"),new Transition("q52", simboluri[57], "q51"),
            new Transition("q52", simboluri[58], "q51"),//Literele mici

            new Transition("q52", simboluri[95], "q51"),new Transition("q52", simboluri[96], "q51"),new Transition("q52", simboluri[97], "q51"),
            new Transition("q52", simboluri[98], "q51"),new Transition("q52", simboluri[99], "q51"),new Transition("q52", simboluri[100], "q51"),
            new Transition("q52", simboluri[101], "q51"),new Transition("q52", simboluri[0], "q51"),
            new Transition("q51", simboluri[3], "q51"),new Transition("q51", simboluri[4], "q51"),new Transition("q51", simboluri[8], "q51"),
            new Transition("q51", simboluri[9], "q51"),new Transition("q51", simboluri[12], "q51"),new Transition("q51", simboluri[26], "q51"),
            new Transition("q51", simboluri[27], "q51"),new Transition("q51", simboluri[31], "q51"),new Transition("q51", simboluri[59], "q51"),
            new Transition("q51", simboluri[61], "q51"),new Transition("q51", simboluri[64], "q51"),
            new Transition("q51", simboluri[91], "q51"),new Transition("q51", simboluri[93], "q51"),new Transition("q51", simboluri[94], "q51"),
            new Transition("q51", simboluri[95], "q51"),//Semne de punctuatie

            new Transition("q51", simboluri[1], "q51"),
            new Transition("q51", simboluri[29], "q51"),new Transition("q51", simboluri[62], "q51"),new Transition("q51", simboluri[5], "q51"),//Operatori

            new Transition("q51", simboluri[6], "q51"),//Ampersand

            new Transition("q51", simboluri[11], "q51"),//Plus

            new Transition("q51", simboluri[13], "q51"),//Minus

            new Transition("q51", simboluri[28], "q51"),//Mai mare

            new Transition("q51", simboluri[30], "q51"),//Mai mic

            new Transition("q51", simboluri[14], "q51"),//Punct

            new Transition("q51", simboluri[2], "q51"),//Ghilimele

            new Transition("q51", simboluri[7], "q51"),//Apostrof

            new Transition("q51", simboluri[32], "q51"),//@

            new Transition("q51", simboluri[63], "q51"),//_

            new Transition("q51", simboluri[16], "q51"),//zero

            new Transition("q51", simboluri[17], "q51"),new Transition("q51", simboluri[18], "q51"),new Transition("q51", simboluri[19], "q51"),
            new Transition("q51", simboluri[20], "q51"),new Transition("q51", simboluri[21], "q51"),new Transition("q51", simboluri[22], "q51"),
            new Transition("q51", simboluri[23], "q51"),new Transition("q51", simboluri[24], "q51"),new Transition("q51", simboluri[25], "q51"),//Cifrele de la 1 la 9

            new Transition("q51", simboluri[65], "q51"),new Transition("q51", simboluri[66], "q51"),new Transition("q51", simboluri[67], "q51"),
            new Transition("q51", simboluri[68], "q51"),new Transition("q51", simboluri[69], "q51"),new Transition("q51", simboluri[70], "q51"),
            new Transition("q51", simboluri[71], "q51"),new Transition("q51", simboluri[72], "q51"),new Transition("q51", simboluri[73], "q51"),
            new Transition("q51", simboluri[74], "q51"),new Transition("q51", simboluri[75], "q51"),new Transition("q51", simboluri[76], "q51"),
            new Transition("q51", simboluri[77], "q51"),new Transition("q51", simboluri[78], "q51"),new Transition("q51", simboluri[79], "q51"),
            new Transition("q51", simboluri[80], "q51"),new Transition("q51", simboluri[81], "q51"),new Transition("q51", simboluri[82], "q51"),
            new Transition("q51", simboluri[83], "q51"),new Transition("q51", simboluri[84], "q51"),new Transition("q51", simboluri[85], "q51"),
            new Transition("q51", simboluri[86], "q51"),new Transition("q51", simboluri[87], "q51"),new Transition("q51", simboluri[88], "q51"),
            new Transition("q51", simboluri[89], "q51"),new Transition("q51", simboluri[90], "q51"),//Literele mari
            new Transition("q51", simboluri[33], "q51"),
            new Transition("q51", simboluri[34], "q51"),new Transition("q51", simboluri[35], "q51"),new Transition("q51", simboluri[36], "q51"),
            new Transition("q51", simboluri[37], "q51"),new Transition("q51", simboluri[38], "q51"),new Transition("q51", simboluri[39], "q51"),
            new Transition("q51", simboluri[40], "q51"),new Transition("q51", simboluri[41], "q51"),new Transition("q51", simboluri[42], "q51"),
            new Transition("q51", simboluri[43], "q51"),new Transition("q51", simboluri[44], "q51"),new Transition("q51", simboluri[45], "q51"),
            new Transition("q51", simboluri[46], "q51"),new Transition("q51", simboluri[47], "q51"),new Transition("q51", simboluri[48], "q51"),
            new Transition("q51", simboluri[49], "q51"),new Transition("q51", simboluri[50], "q51"),new Transition("q51", simboluri[51], "q51"),
            new Transition("q51", simboluri[52], "q51"),new Transition("q51", simboluri[53], "q51"),new Transition("q51", simboluri[54], "q51"),
            new Transition("q51", simboluri[55], "q51"),new Transition("q51", simboluri[56], "q51"),new Transition("q51", simboluri[57], "q51"),
            new Transition("q51", simboluri[58], "q51"),//Literele mici

            new Transition("q51", simboluri[95], "q51"),new Transition("q51", simboluri[96], "q51"),new Transition("q51", simboluri[97], "q51"),
            new Transition("q51", simboluri[98], "q51"),new Transition("q51", simboluri[99], "q51"),new Transition("q51", simboluri[100], "q51"),
            new Transition("q51", simboluri[101], "q51"),new Transition("q51", simboluri[0], "q51"),

            new Transition("q50", simboluri[15], "q55"),new Transition("q55", simboluri[99], "q56"),new Transition("q56", simboluri[98], "q57"),
             new Transition("q55", simboluri[3], "q55"),new Transition("q55", simboluri[4], "q55"),new Transition("q55", simboluri[8], "q55"),
            new Transition("q55", simboluri[9], "q55"),new Transition("q55", simboluri[12], "q55"),new Transition("q55", simboluri[26], "q55"),
            new Transition("q55", simboluri[27], "q55"),new Transition("q55", simboluri[31], "q55"),new Transition("q55", simboluri[59], "q55"),
            new Transition("q55", simboluri[61], "q55"),new Transition("q55", simboluri[64], "q55"),
            new Transition("q55", simboluri[91], "q55"),new Transition("q55", simboluri[93], "q55"),new Transition("q55", simboluri[94], "q55"),
            new Transition("q55", simboluri[95], "q55"),//Semne de punctuatie

            new Transition("q55", simboluri[1], "q55"),new Transition("q51", simboluri[15], "q51"),new Transition("q56", simboluri[15], "q55"),
            new Transition("q55", simboluri[29], "q55"),new Transition("q55", simboluri[62], "q55"),new Transition("q55", simboluri[5], "q55"),//Operatori

            new Transition("q55", simboluri[6], "q55"),new Transition("q55", simboluri[15], "q55"),

            new Transition("q55", simboluri[11], "q55"),//Plus

            new Transition("q55", simboluri[13], "q55"),//Minus

            new Transition("q55", simboluri[28], "q55"),//Mai mare

            new Transition("q55", simboluri[30], "q55"),//Mai mic

            new Transition("q55", simboluri[14], "q55"),//Punct

            new Transition("q55", simboluri[2], "q55"),//Ghilimele

            new Transition("q55", simboluri[7], "q55"),//Apostrof

            new Transition("q55", simboluri[32], "q55"),//@

            new Transition("q55", simboluri[63], "q55"),//_

            new Transition("q55", simboluri[16], "q55"),//zero

            new Transition("q55", simboluri[17], "q55"),new Transition("q55", simboluri[18], "q55"),new Transition("q55", simboluri[19], "q55"),
            new Transition("q55", simboluri[20], "q55"),new Transition("q55", simboluri[21], "q55"),new Transition("q55", simboluri[22], "q55"),
            new Transition("q55", simboluri[23], "q55"),new Transition("q55", simboluri[24], "q55"),new Transition("q55", simboluri[25], "q55"),//Cifrele de la 1 la 9

            new Transition("q55", simboluri[65], "q55"),new Transition("q55", simboluri[66], "q55"),new Transition("q55", simboluri[67], "q55"),
            new Transition("q55", simboluri[68], "q55"),new Transition("q55", simboluri[69], "q55"),new Transition("q55", simboluri[70], "q55"),
            new Transition("q55", simboluri[71], "q55"),new Transition("q55", simboluri[72], "q55"),new Transition("q55", simboluri[73], "q55"),
            new Transition("q55", simboluri[74], "q55"),new Transition("q55", simboluri[75], "q55"),new Transition("q55", simboluri[76], "q55"),
            new Transition("q55", simboluri[77], "q55"),new Transition("q55", simboluri[78], "q55"),new Transition("q55", simboluri[79], "q55"),
            new Transition("q55", simboluri[80], "q55"),new Transition("q55", simboluri[81], "q55"),new Transition("q55", simboluri[82], "q55"),
            new Transition("q55", simboluri[83], "q55"),new Transition("q55", simboluri[84], "q55"),new Transition("q55", simboluri[85], "q55"),
            new Transition("q55", simboluri[86], "q55"),new Transition("q55", simboluri[87], "q55"),new Transition("q55", simboluri[88], "q55"),
            new Transition("q55", simboluri[89], "q55"),new Transition("q55", simboluri[90], "q55"),//Literele mari
            new Transition("q55", simboluri[33], "q55"),
            new Transition("q55", simboluri[34], "q55"),new Transition("q55", simboluri[35], "q55"),new Transition("q55", simboluri[36], "q55"),
            new Transition("q55", simboluri[37], "q55"),new Transition("q55", simboluri[38], "q55"),new Transition("q55", simboluri[39], "q55"),
            new Transition("q55", simboluri[40], "q55"),new Transition("q55", simboluri[41], "q55"),new Transition("q55", simboluri[42], "q55"),
            new Transition("q55", simboluri[43], "q55"),new Transition("q55", simboluri[44], "q55"),new Transition("q55", simboluri[45], "q55"),
            new Transition("q55", simboluri[46], "q55"),new Transition("q55", simboluri[47], "q55"),new Transition("q55", simboluri[48], "q55"),
            new Transition("q55", simboluri[49], "q55"),new Transition("q55", simboluri[50], "q55"),new Transition("q55", simboluri[51], "q55"),
            new Transition("q55", simboluri[52], "q55"),new Transition("q55", simboluri[53], "q55"),new Transition("q55", simboluri[54], "q55"),
            new Transition("q55", simboluri[55], "q55"),new Transition("q55", simboluri[56], "q55"),new Transition("q55", simboluri[57], "q55"),
            new Transition("q55", simboluri[58], "q55"),//Literele mici

            new Transition("q55", simboluri[95], "q55"),new Transition("q55", simboluri[96], "q55"),new Transition("q55", simboluri[97], "q55"),
            new Transition("q55", simboluri[98], "q55"),new Transition("q55", simboluri[100], "q55"),
            new Transition("q55", simboluri[101], "q55"),new Transition("q55", simboluri[0], "q55"),

             new Transition("q56", simboluri[3], "q55"),new Transition("q55", simboluri[4], "q55"),new Transition("q55", simboluri[8], "q55"),
            new Transition("q56", simboluri[9], "q55"),new Transition("q56", simboluri[12], "q55"),new Transition("q56", simboluri[26], "q55"),
            new Transition("q56", simboluri[27], "q55"),new Transition("q56", simboluri[31], "q55"),new Transition("q56", simboluri[59], "q55"),
            new Transition("q56", simboluri[61], "q55"),new Transition("q56", simboluri[64], "q55"),
            new Transition("q56", simboluri[91], "q55"),new Transition("q56", simboluri[93], "q55"),new Transition("q56", simboluri[94], "q55"),
            new Transition("q56", simboluri[95], "q55"),//Semne de punctuatie

            new Transition("q56", simboluri[1], "q55"),
            new Transition("q56", simboluri[29], "q55"),new Transition("q56", simboluri[62], "q55"),new Transition("q56", simboluri[5], "q55"),//Operatori

            new Transition("q56", simboluri[6], "q55"),//Ampersand

            new Transition("q56", simboluri[11], "q55"),//Plus

            new Transition("q56", simboluri[13], "q55"),//Minus

            new Transition("q56", simboluri[28], "q55"),//Mai mare

            new Transition("q56", simboluri[30], "q55"),//Mai mic

            new Transition("q56", simboluri[14], "q55"),//Punct

            new Transition("q56", simboluri[2], "q55"),//Ghilimele

            new Transition("q56", simboluri[7], "q55"),//Apostrof

            new Transition("q56", simboluri[32], "q55"),//@

            new Transition("q56", simboluri[63], "q55"),//_

            new Transition("q56", simboluri[16], "q55"),//zero

            new Transition("q56", simboluri[17], "q55"),new Transition("q56", simboluri[18], "q55"),new Transition("q56", simboluri[19], "q55"),
            new Transition("q56", simboluri[20], "q55"),new Transition("q56", simboluri[21], "q55"),new Transition("q56", simboluri[22], "q55"),
            new Transition("q56", simboluri[23], "q55"),new Transition("q56", simboluri[24], "q55"),new Transition("q56", simboluri[25], "q55"),//Cifrele de la 1 la 9

            new Transition("q56", simboluri[65], "q55"),new Transition("q56", simboluri[66], "q55"),new Transition("q56", simboluri[67], "q55"),
            new Transition("q56", simboluri[68], "q55"),new Transition("q56", simboluri[69], "q55"),new Transition("q56", simboluri[70], "q55"),
            new Transition("q56", simboluri[71], "q55"),new Transition("q56", simboluri[72], "q55"),new Transition("q56", simboluri[73], "q55"),
            new Transition("q56", simboluri[74], "q55"),new Transition("q56", simboluri[75], "q55"),new Transition("q56", simboluri[76], "q55"),
            new Transition("q56", simboluri[77], "q55"),new Transition("q56", simboluri[78], "q55"),new Transition("q56", simboluri[79], "q55"),
            new Transition("q56", simboluri[80], "q55"),new Transition("q56", simboluri[81], "q55"),new Transition("q56", simboluri[82], "q55"),
            new Transition("q56", simboluri[83], "q55"),new Transition("q56", simboluri[84], "q55"),new Transition("q56", simboluri[85], "q55"),
            new Transition("q56", simboluri[86], "q55"),new Transition("q56", simboluri[87], "q55"),new Transition("q56", simboluri[88], "q55"),
            new Transition("q56", simboluri[89], "q55"),new Transition("q56", simboluri[90], "q55"),//Literele mari
            new Transition("q56", simboluri[33], "q55"),
            new Transition("q56", simboluri[34], "q55"),new Transition("q56", simboluri[35], "q55"),new Transition("q56", simboluri[36], "q55"),
            new Transition("q56", simboluri[37], "q55"),new Transition("q56", simboluri[38], "q55"),new Transition("q56", simboluri[39], "q55"),
            new Transition("q56", simboluri[40], "q55"),new Transition("q56", simboluri[41], "q55"),new Transition("q56", simboluri[42], "q55"),
            new Transition("q56", simboluri[43], "q55"),new Transition("q56", simboluri[44], "q55"),new Transition("q56", simboluri[45], "q55"),
            new Transition("q56", simboluri[46], "q55"),new Transition("q56", simboluri[47], "q55"),new Transition("q56", simboluri[48], "q55"),
            new Transition("q56", simboluri[49], "q55"),new Transition("q56", simboluri[50], "q55"),new Transition("q56", simboluri[51], "q55"),
            new Transition("q56", simboluri[52], "q55"),new Transition("q56", simboluri[53], "q55"),new Transition("q56", simboluri[54], "q55"),
            new Transition("q56", simboluri[55], "q55"),new Transition("q56", simboluri[56], "q55"),new Transition("q56", simboluri[57], "q55"),
            new Transition("q56", simboluri[58], "q55"),//Literele mici

            new Transition("q56", simboluri[95], "q55"),new Transition("q56", simboluri[96], "q55"),new Transition("q56", simboluri[97], "q55"),
            new Transition("q56", simboluri[100], "q55"),
            new Transition("q56", simboluri[101], "q55"),new Transition("q56", simboluri[0], "q55"),
            new Transition("q55",simboluri[60],"q55"),new Transition("q56",simboluri[60],"q55")
            //Comentarii.

            };

            return Delta;
        }

        private readonly char[] simboluri =
        {
            ' ','!','\"','#','$','%','&','\'','(',')','*','+',',','-','.','/',
            '0','1','2','3','4','5','6','7','8','9',':',';','<','=','>','?','@',
            'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
            '[','\\',']','^','_','`',
            'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
            '{','|','}','~',
            '\a','\b','\f','\n','\r','\t','\v'
        };
    }
}
